import request from '@/utils/request'

export function listSubject(query) {
  return request({
    url: '/dv/subject/list',
    method: 'get',
    params: query
  })
}

export function addSubject(data){
  return request({
    url:'dv/subject/add',
    method: 'post',
    data:data
  })
}

export function updateSubject(data){
  return request({
    url:'dv/subject/update',
    method: 'post',
    data:data
  })
}

export function getSubjectById(query){
  return request({
    url:'dv/subject/getById',
    method: 'get',
    params: {
        subjectId: query
    }
  })
}

export function deleteSubject(query){
  return request({
    url:'dv/subject/deleteById',
    method: 'get',
    params: {subjectId:query}
  })
}

export function deleteList(query){
  return request({
    url:'dv/subject/deleteList',
    method: 'get',
    params: {subjectIds:query}
  })
}

export function getLogEcharts() {
  return request({
    url: '/dv/subject/logEcharts',
    method: 'get',
  })
}
